#FROM fansin/oraclejdk
#FROM openjdk:8u121-jre-alpine
#FROM jdk1.8_261_jomi:latest
FROM carsharing/alpine-oraclejdk8-bash
WORKDIR /srv
VOLUME /data
VOLUME /srv/logs
ARG JAR_FILE
COPY ${JAR_FILE} /srv/app.jar
# 变量定义
ARG LIB=target/lib-manage
COPY ${LIB} /srv/lib-manage
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
#RUN yum install dejavu-sans-fonts fontconfig -y
ENV JAVA_OPTS='-Xms256M -Xmx512M -Xss512k -XX:MetaspaceSize=64M -XX:MaxMetaspaceSize=128M'
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar ./app.jar"]
EXPOSE 8099
